<%@page import="com.iflysse.bbs.dao.impl.NewsDaoImpl"%>
<%@page import="com.iflysse.bbs.dao.NewsDao"%>
<%@page import="com.iflysse.bbs.model.NewsInfo"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="../base.jsp"%>
<%
	//检查是否登陆
	if (session.getAttribute("currentUser") == null) {
		request.getRequestDispatcher("/index_handler.jsp").forward(
				request, response);
		return;
	}

	String newsid = request.getParameter("newsid") == null ? null
			: request.getParameter("newsid").toString().trim();

	NewsDao newsDao = new NewsDaoImpl();
	NewsInfo newsInfo = newsDao.getNewsInfo(Integer.valueOf(newsid)
			.intValue());

	request.setAttribute("newsInfo", newsInfo);

	request.getRequestDispatcher("/pages/personal/editnews.jsp")
			.forward(request, response);
%>